
package gov.chinatax.ctcps.generator.form;

import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for xtglKzc.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="xtglKzcForm"
 */
public class XtglKzcForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _kzbh = null;
   private java.lang.String _kzflDm = null;
   private java.lang.String _kzflMc = null;
   private java.lang.String _csflDm = null;
   private java.lang.String _csflMc = null;
   private java.lang.String _csValue = null;
   private java.lang.String _csBz = null;
   private java.lang.String _zt2 = null;
   private java.lang.String _zt3 = null;

   /**
    * Standard constructor.
    */
   public XtglKzcForm() {
   }

   /**
    * Returns the kzbh
    *
    * @return the kzbh
    */
   public java.lang.String getKzbh() {
      return _kzbh;
   }

   /**
    * Sets the kzbh
    *
    * @param kzbh the new kzbh value
    */
   public void setKzbh(java.lang.String kzbh) {
      _kzbh = kzbh;
   }
   /**
    * Returns the kzflDm
    *
    * @return the kzflDm
    */
   public java.lang.String getKzflDm() {
      return _kzflDm;
   }

   /**
    * Sets the kzflDm
    *
    * @param kzflDm the new kzflDm value
    */
   public void setKzflDm(java.lang.String kzflDm) {
      _kzflDm = kzflDm;
   }
   /**
    * Returns the kzflMc
    *
    * @return the kzflMc
    */
   public java.lang.String getKzflMc() {
      return _kzflMc;
   }

   /**
    * Sets the kzflMc
    *
    * @param kzflMc the new kzflMc value
    */
   public void setKzflMc(java.lang.String kzflMc) {
      _kzflMc = kzflMc;
   }
   /**
    * Returns the csflDm
    *
    * @return the csflDm
    */
   public java.lang.String getCsflDm() {
      return _csflDm;
   }

   /**
    * Sets the csflDm
    *
    * @param csflDm the new csflDm value
    */
   public void setCsflDm(java.lang.String csflDm) {
      _csflDm = csflDm;
   }
   /**
    * Returns the csflMc
    *
    * @return the csflMc
    */
   public java.lang.String getCsflMc() {
      return _csflMc;
   }

   /**
    * Sets the csflMc
    *
    * @param csflMc the new csflMc value
    */
   public void setCsflMc(java.lang.String csflMc) {
      _csflMc = csflMc;
   }
   /**
    * Returns the csValue
    *
    * @return the csValue
    */
   public java.lang.String getCsValue() {
      return _csValue;
   }

   /**
    * Sets the csValue
    *
    * @param csValue the new csValue value
    */
   public void setCsValue(java.lang.String csValue) {
      _csValue = csValue;
   }
   /**
    * Returns the csBz
    *
    * @return the csBz
    */
   public java.lang.String getCsBz() {
      return _csBz;
   }

   /**
    * Sets the csBz
    *
    * @param csBz the new csBz value
    */
   public void setCsBz(java.lang.String csBz) {
      _csBz = csBz;
   }
   /**
    * Returns the zt2
    *
    * @return the zt2
    */
   public java.lang.String getZt2() {
      return _zt2;
   }

   /**
    * Sets the zt2
    *
    * @param zt2 the new zt2 value
    */
   public void setZt2(java.lang.String zt2) {
      _zt2 = zt2;
   }
   /**
    * Returns the zt3
    *
    * @return the zt3
    */
   public java.lang.String getZt3() {
      return _zt3;
   }

   /**
    * Sets the zt3
    *
    * @param zt3 the new zt3 value
    */
   public void setZt3(java.lang.String zt3) {
      _zt3 = zt3;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getKzbh() == null) {
         errors.add("kzbh", new ActionError("error.kzbh.required"));
      }
      // TODO test format/data
      return errors;
   }
}
